package ${entity.package};

import cn.lg.soar.core.annotations.constraints.group.*;
import cn.lg.soar.database.query.annotations.*;
import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.*;
import io.swagger.annotations.*;
import lombok.Data;
import java.io.Serializable;
import java.time.*;
import javax.validation.constraints.*;

<#if imports.baseEntity??>
import ${imports.baseEntity.import};
</#if>

/**
 * ${comment}
 * @author ${author}
 * @since ${date}
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@Data
@ApiModel(value = "${entity}", description = "${comment}")
@TableName("${tableName}")
public class ${entity}<#if imports.baseEntity??> extends ${imports.baseEntity}</#if> {

<#list jl as x>
    /** ${x.comment} */
    <#if x.annotations??>
        <#list x.annotations as annotation>
    ${annotation}
        </#list>
    </#if>
    <#if x.pk == true>
    @ExcelIgnore
    @ApiModelProperty(value = "主键")
    @TableId
    <#else>
    @ExcelProperty(value = "${x.comment}")
    @ApiModelProperty(value = "${x.comment}")
    </#if>
    private ${x.javaType} ${x.propertyName};

</#list>
<#if pkName??>
    @JsonIgnore
    @Override
    public Serializable primaryKey() {
        return this.${pkName};
    }

</#if>
}
